<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">
      <!-- 指令:v-once 表示只会渲染一次-->
      <!-- 只要加了v-once 当前元素和子元素都只渲染一次 -->
        <h2 v-once>{{message}}</h2>
        <button @click="changeMessage">改变message</button>
    </div>

    <script src="./lib/Vue.js"></script>
    <script>
        const app = Vue.createApp({
            data() {
                return{
                  message:"Hello Vue"
                }
            },
            methods: {
              changeMessage() {
                this.message = "你好啊，李银河"
                console.log(this.message);//点击后不改变
              }
            }
        })
        app.mount("#app")
    </script>
</body>
</html>